fixes to count handling for index action