ws.max_row will give you the number of lines per sheet.
Starting with openpyxl 2.4, you can also access individual rows and columns and use their length to answer the question.
len(ws['A'])
Although it is worth noting that Excel uses for checking data for a single column 1:1048576.