The interval works fine. The problem is the value of count captured in useEffect arrow function has the same value of 0 each time the interval hits, so effectively each second you set the state to 1 which is 0+1.
count
0+1