I'm using below
wp-cli command to get latest post ID:
wp post list --order='DESC' --orderby='ID' --field='ID' | head -1
This, however is inefficient as all posts are retrieved from DB and then
head limits the number of returned posts.
Is there a way to limit the number of returned posts using wp query?