switched pulsecount algorithm to median counts per second