- /* Get stats */
- stats = tny_folder_get_stats (folder);
- count = g_strdup_printf ("%d", tny_folder_stats_get_all_count (stats));
- /* Format the size */
- size = tny_folder_stats_get_local_size (stats);
+ /* Get data. We use our function because it's recursive */
+ count = modest_tny_folder_store_get_message_count (TNY_FOLDER_STORE (folder));
+ size = modest_tny_folder_store_get_local_size (TNY_FOLDER_STORE (folder));
+
+ /* Format count and size */
+ count_s = g_strdup_printf ("%d", count);