add setVisiblePageCount method for cre.cpp