Some bug fixes and added shortcut for count