Adapted parsing code for activity count to new format.