code: @Override
  	public int countByLtS(Date sentDate) {
  		FinderPath finderPath = FINDER_PATH_WITH_PAGINATION_COUNT_BY_LTS;
  
  		Object[] finderArgs = new Object[] { _getTime(sentDate) };
  
  		Long count = (Long)finderCache.getResult(finderPath, finderArgs, this);
  
  		if (count == null) {
  			StringBundler query = new StringBundler(2);
  
  			query.append(_SQL_COUNT_COMMERCENOTIFICATIONQUEUEENTRY_WHERE);
  
  			boolean bindSentDate = false;
  
  			if (sentDate == null) {
  				query.append(_FINDER_COLUMN_LTS_SENTDATE_1);
  			}
  			else {
  				bindSentDate = true;
  
  				query.append(_FINDER_COLUMN_LTS_SENTDATE_2);
  			}
  
  			String sql = query.toString();
  
  			Session session = null;
  
  			try {
  				session = openSession();
  
  				Query q = session.createQuery(sql);
  
  				QueryPos qPos = QueryPos.getInstance(q);
  
  				if (bindSentDate) {
  					qPos.add(new Timestamp(sentDate.getTime()));
  				}
  
  				count = (Long)q.uniqueResult();
  
  				finderCache.putResult(finderPath, finderArgs, count);
  			}
  			catch (Exception e) {
  				finderCache.removeResult(finderPath, finderArgs);
  
  				throw processException(e);
  			}
  			finally {
  				closeSession(session);
  			}
  		}
  
  		return count.intValue();
  	}
docs: Returns the number of commerce notification queue entries where sentDate &lt; &#63;.
  
  @param sentDate the sent date
  @return the number of matching commerce notification queue entries