Index: bp-activity/bp-activity-classes.php
===================================================================
--- bp-activity/bp-activity-classes.php	(revision 7867)
+++ bp-activity/bp-activity-classes.php	(working copy)
@@ -1201,6 +1201,32 @@
 
 		return $wpdb->get_var( $wpdb->prepare( "UPDATE {$bp->activity->table_name} SET hide_sitewide = 1 WHERE user_id = %d", $user_id ) );
 	}
+
+	/**
+	 * Get activities count detailled by types
+	 *
+	 * @param int $user_id The ID of the user.
+	 * @return array the stats
+	 */
+	public static function get_count_by_type( $user_id = '' ) {
+		global $wpdb;
+
+		$activity_stats = array();
+		$total_activity = 0;
+
+		if ( empty( $user_id ) )
+			return $activity_stats;
+
+		$activity_table = buddypress()->activity->table_name;
+
+		$activity_stats = $wpdb->get_results( $wpdb->prepare( "SELECT type, COUNT(*) as sub_total FROM {$activity_table} WHERE user_id = %d AND type != 'last_activity' GROUP BY type ORDER BY type ASC", $user_id ), OBJECT_K );
+		
+		foreach ( $activity_stats as $activity_type ) {
+			$total_activity += absint( $activity_type->sub_total );
+		}
+
+		return array( 'types' => $activity_stats, 'total' => $total_activity );
+	}
 }
 
 /**
Index: bp-activity/bp-activity-functions.php
===================================================================
--- bp-activity/bp-activity-functions.php	(revision 7867)
+++ bp-activity/bp-activity-functions.php	(working copy)
@@ -1812,3 +1812,54 @@
 function bp_embed_activity_save_cache( $cache, $cachekey, $id ) {
 	bp_activity_update_meta( $id, $cachekey, $cache );
 }
+
+/**
+ * Builds Activity stats by types
+ *
+ * If no types are set, defaults to total activities
+ *
+ * @since BuddyPress (?)
+ * 
+ * @param  integer $user_id
+ * @param  boolean $hide_empty should we display empty types ?
+ * @param  array $types list of available types
+ * @return array activity stats
+ */
+function bp_activity_get_count_by_type( $user_id = 0, $hide_empty = false, $types = array() ) {
+	$activity_stats = BP_Activity_Activity::get_count_by_type( $user_id );
+
+	// no activity returns 0
+	if ( empty( $activity_stats ) )
+		return array( 'total' => 0 );
+
+	// no types retuns total of activities
+	if ( empty( $types ) ) {
+		unset( $activity_stats['types'] );
+		return $activity_stats;
+	}
+
+	$types_stats_ordered = array();
+
+	// fill the array with 0 value for each type
+	if( empty( $hide_empty ) )
+		$types_stats_ordered = array_fill_keys( array_keys( $types ), 0 );
+
+	// fill the type the user added activities in
+	foreach( $types as $key => $type ) {
+		if( ! empty( $activity_stats['types'][ $key ] ) ) {
+			$types_stats_ordered[ $key ] = $activity_stats['types'][ $key ]->sub_total;
+		}
+	}
+
+	// Most used type first
+	arsort( $types_stats_ordered );
+	
+	// keep only types the user added activities in
+	if( ! empty( $hide_empty ) )
+		$types = array_intersect_key( $types, $types_stats_ordered );
+
+	// We need to merge "human" description for types
+	$activity_stats['types'] = array_merge_recursive( $types_stats_ordered, $types );
+	
+	return $activity_stats;
+}
Index: bp-activity/bp-activity-template.php
===================================================================
--- bp-activity/bp-activity-template.php	(revision 7867)
+++ bp-activity/bp-activity-template.php	(working copy)
@@ -3265,3 +3265,70 @@
 <?php
 }
 add_action( 'bp_head', 'bp_activity_sitewide_feed' );
+
+
+/** Stats **********************************************************************/
+
+/**
+ * Display the number of activities by type in user's profile.
+ *
+ * @since BuddyPress (?)
+ *
+ * @param array $args before|after|user_id
+ * @uses bp_activity_get_profile_stats() to get the stats
+ */
+function bp_activity_profile_stats( $args = '' ) {
+	echo bp_activity_get_profile_stats( $args );
+}
+add_action( 'bp_members_admin_user_stats', 'bp_activity_profile_stats', 10, 1 );
+
+/**
+ * Return the number of activities by type in user's profile.
+ *
+ * @since BuddyPress (?)
+ *
+ * @param array $args before|after|user_id|types|hide_empty
+ * @return string HTML for stats output.
+ */
+function bp_activity_get_profile_stats( $args = '' ) {
+
+	// Parse the args
+	$r = bp_parse_args( $args, array(
+		'before'     => '<li class="bp-activity-profile-stats">',
+		'after'      => '</li>',
+		'user_id'    => bp_displayed_user_id(),
+		'types'      => bp_activity_get_types(),
+		'hide_empty' => true,
+		'output'     => ''
+	), 'activity_get_profile_stats' );
+
+	// Allow completely overloaded output
+	if ( empty( $r['output'] ) ) {
+
+		// Only proceed if a user ID was passed
+		if ( ! empty( $r['user_id'] ) ) {
+
+			// Get the user activities count by type
+			$activity_stats = bp_activity_get_count_by_type( $r['user_id'], $r['hide_empty'], $r['types'] );
+			$total_activities = absint( $activity_stats['total'] );
+
+			$r['output'] = $r['before'] . sprintf( _n( '%s activity', '%s activities', $total_activities, 'buddypress' ), '<strong>'. $total_activities .'</strong>' );
+
+			// If types exist, show some detailed output
+			if ( ! empty( $activity_stats['types'] ) ) {
+				$r['output'] .= '<ol>';
+
+				foreach ( $activity_stats['types'] as $type ) {
+					$r['output'] .= '<li>' . esc_html( $type[1] ) . ': ' . absint( $type[0] ) .'</li>';
+				}
+
+				$r['output'] .= '</ol>';
+			}
+
+			$r['output'] .= $r['after'];
+		}
+	}
+
+	// Filter and return
+	return apply_filters( 'bp_activity_get_profile_stats', $r['output'], $r );
+}
Index: bp-members/admin/css/admin.css
===================================================================
--- bp-members/admin/css/admin.css	(revision 7867)
+++ bp-members/admin/css/admin.css	(working copy)
@@ -60,6 +60,7 @@
 div#community-profile-page li.bp-friends-profile-stats:before,
 div#community-profile-page li.bp-groups-profile-stats:before,
 div#community-profile-page li.bp-blogs-profile-stats:before,
+div#community-profile-page li.bp-activity-profile-stats:before,
 div#community-profile-page a.bp-xprofile-avatar-user-admin:before {
 	font-family: 'dashicons';
 	font-size: 18px;
@@ -83,6 +84,15 @@
 	content: "\f120";
 }
 
+div#community-profile-page li.bp-activity-profile-stats:before {
+	content:"\f452";
+}
+
+div#community-profile-page li.bp-activity-profile-stats ol li {
+	font-size:80%;
+	margin-bottom:0;
+} 
+
 div#community-profile-page a.bp-xprofile-avatar-user-admin:before {
 	content:"\f182";
 }
Index: bp-members/admin/css/admin.min.css
===================================================================
--- bp-members/admin/css/admin.min.css	(revision 7867)
+++ bp-members/admin/css/admin.min.css	(working copy)
@@ -1 +1 @@
-div#profile-page.wrap form#your-profile{position:relative}div#profile-page.wrap form#your-profile h3:first-of-type{margin-top:6em}div#profile-page.wrap form#your-profile ul#profile-nav{position:absolute;top:-6em;border-bottom:solid 1px #ccc;width:100%}div#community-profile-page h2:first-of-type{margin-bottom:1em}div#community-profile-page h2.profile-section{border-bottom:dotted 1px #ccc}div#community-profile-page ul#profile-nav{border-bottom:solid 1px #ccc;width:100%;margin-top:1em;margin-bottom:1em;padding:1em 0;padding-bottom:0;height:2.4em}div#community-profile-page ul#profile-nav li,form#your-profile ul#profile-nav li{margin-left:.4em;float:left;font-weight:700;font-size:15px;line-height:24px}div#community-profile-page ul#profile-nav li a,form#your-profile ul#profile-nav li a{text-decoration:none;color:#888}div#community-profile-page ul#profile-nav li a:hover,div#community-profile-page ul#profile-nav li.nav-tab-active a,form#your-profile ul#profile-nav li a:hover,form#your-profile ul#profile-nav li.nav-tab-active a{text-decoration:none;color:#000}div#community-profile-page a.bp-xprofile-avatar-user-admin:before,div#community-profile-page li.bp-blogs-profile-stats:before,div#community-profile-page li.bp-friends-profile-stats:before,div#community-profile-page li.bp-groups-profile-stats:before,div#community-profile-page li.bp-members-profile-stats:before{font-family:dashicons;font-size:18px;vertical-align:bottom;margin-right:5px}div#community-profile-page li.bp-members-profile-stats:before{content:"\f130"}div#community-profile-page li.bp-friends-profile-stats:before{content:"\f454"}div#community-profile-page li.bp-groups-profile-stats:before{content:"\f456"}div#community-profile-page li.bp-blogs-profile-stats:before{content:"\f120"}div#community-profile-page a.bp-xprofile-avatar-user-admin:before{content:"\f182"}div#community-profile-page div#bp_xprofile_user_admin_avatar div.avatar{width:150px;margin:0 auto}div#community-profile-page div#bp_xprofile_user_admin_avatar a{display:block;margin:1em 0;text-decoration:none;color:#888}div#community-profile-page p.not-activated{margin:1em 1em 0;color:red}div#community-profile-page .form-table td.admin-field-visibility-td{padding:5px 5px 15px}div#community-profile-page .form-table tr.admin-field-visibility-tr{border-bottom:dotted 1px #ccc}div#community-profile-page .form-table tr.admin-field-visibility-tr:last-child{border:0}div#community-profile-page .field-visibility-settings legend,div#community-profile-page .field-visibility-settings-notoggle{font-size:14px;font-style:italic;color:#666}div#community-profile-page .field-visibility-settings ul{margin:0;font-size:13px}div#community-profile-page .field-visibility-settings ul li{display:inline-block;margin-right:1em}div#community-profile-page .form-table td.admin-field-checkbox label,div#community-profile-page .form-table td.admin-field-radio label{display:block}
\ No newline at end of file
+div#profile-page.wrap form#your-profile{position:relative}div#profile-page.wrap form#your-profile h3:first-of-type{margin-top:6em}div#profile-page.wrap form#your-profile ul#profile-nav{position:absolute;top:-6em;border-bottom:solid 1px #ccc;width:100%}div#community-profile-page h2:first-of-type{margin-bottom:1em}div#community-profile-page h2.profile-section{border-bottom:dotted 1px #ccc}div#community-profile-page ul#profile-nav{border-bottom:solid 1px #ccc;width:100%;margin-top:1em;margin-bottom:1em;padding:1em 0;padding-bottom:0;height:2.4em}div#community-profile-page ul#profile-nav li,form#your-profile ul#profile-nav li{margin-left:.4em;float:left;font-weight:700;font-size:15px;line-height:24px}div#community-profile-page ul#profile-nav li a,form#your-profile ul#profile-nav li a{text-decoration:none;color:#888}div#community-profile-page ul#profile-nav li a:hover,div#community-profile-page ul#profile-nav li.nav-tab-active a,form#your-profile ul#profile-nav li a:hover,form#your-profile ul#profile-nav li.nav-tab-active a{text-decoration:none;color:#000}div#community-profile-page a.bp-xprofile-avatar-user-admin:before,div#community-profile-page li.bp-activity-profile-stats:before,div#community-profile-page li.bp-blogs-profile-stats:before,div#community-profile-page li.bp-friends-profile-stats:before,div#community-profile-page li.bp-groups-profile-stats:before,div#community-profile-page li.bp-members-profile-stats:before{font-family:dashicons;font-size:18px;vertical-align:bottom;margin-right:5px}div#community-profile-page li.bp-members-profile-stats:before{content:"\f130"}div#community-profile-page li.bp-friends-profile-stats:before{content:"\f454"}div#community-profile-page li.bp-groups-profile-stats:before{content:"\f456"}div#community-profile-page li.bp-blogs-profile-stats:before{content:"\f120"}div#community-profile-page li.bp-activity-profile-stats:before{content:"\f452"}div#community-profile-page li.bp-activity-profile-stats ol li{font-size:80%;margin-bottom:0}div#community-profile-page a.bp-xprofile-avatar-user-admin:before{content:"\f182"}div#community-profile-page div#bp_xprofile_user_admin_avatar div.avatar{width:150px;margin:0 auto}div#community-profile-page div#bp_xprofile_user_admin_avatar a{display:block;margin:1em 0;text-decoration:none;color:#888}div#community-profile-page p.not-activated{margin:1em 1em 0;color:red}div#community-profile-page .form-table td.admin-field-visibility-td{padding:5px 5px 15px}div#community-profile-page .form-table tr.admin-field-visibility-tr{border-bottom:dotted 1px #ccc}div#community-profile-page .form-table tr.admin-field-visibility-tr:last-child{border:0}div#community-profile-page .field-visibility-settings legend,div#community-profile-page .field-visibility-settings-notoggle{font-size:14px;font-style:italic;color:#666}div#community-profile-page .field-visibility-settings ul{margin:0;font-size:13px}div#community-profile-page .field-visibility-settings ul li{display:inline-block;margin-right:1em}div#community-profile-page .form-table td.admin-field-checkbox label,div#community-profile-page .form-table td.admin-field-radio label{display:block}
\ No newline at end of file
