minor changes to Count