C***********************************************************************
C
	SUBROUTINE IFCNT( TIMEL, COUNTL)
C
      INCLUDE 'COMMON.FTN'
C Calls STSCAN, IFERR
C
	IF(IBUG.NE.0) WRITE(IBUG,4) TIMEL, COUNTL
4	FORMAT(' >Count for',F6.2,' seconds or',F8.0,' counts.')
	KICK = 0
	IFSTAT = 4
	CTIME=TIMEL
C
	CALL STSCAN( COUNTS, .TRUE., IBAD, 1, TIMEL, 0.1, 1, 0)
	IF(IBAD.GT.0) GOTO 9999
C
	IFSTAT = -4
	KICK = IBAD
	CALL IFERR
C
9999	RETURN
	END
