get_system_idx working for system folders

broken for public folders like the rest
implemented get_message_count for messages inside system folders

The test are broken because the sample data only show a message inside public folder