figured out the counting stars algorythm and code