Added first pulse flag to start the count only after the first pps pulse, not right after reset.