fix dataset count
use instance variable instead