add select and count