Get number of rows using tput instead of stty for portability issue