countValid function

Count valid observations per time point for a given trait