Added count pixels method
Added exists method and updated some javadocs