code: public static int findInfractionCount(EntityManager em, PrincipalUser user, SubSystem subSystem, long startTime) {
          List<SuspensionRecord> records;
  
          if (subSystem == null) {
              records = findByUser(em, user);
          } else {
              SuspensionRecord record = findByUserAndSubsystem(em, user, subSystem);
  
              records = record == null ? new ArrayList<SuspensionRecord>(0) : Arrays.asList(new SuspensionRecord[] { record });
          }
  
          int count = 0;
  
          for (SuspensionRecord record : records) {
              List<Long> timestamps = record.getInfractionHistory();
  
              for (Long timestamp : timestamps) {
                  if (timestamp > startTime) {
                      count++;
                  }
              }
          }
          return count;
      }
docs: Finds the number of user infractions for a subsystem that have occurred since the given start time.
  
  @param   em         The entity manager to use. Cannot be null.
  @param   user       The user. Cannot be null.
  @param   subSystem  The subsystem. If null, infractions for all subsystems are counted.
  @param   startTime  The start time threshold.
  
  @return  The number of infractions.