counter ruby script