Adding #count, #avg and fixing Division By Zero bug