Added a simple count function
Added simple count function