The only possible way I know of to do this is via the SOAP API. But I would never use this to retrieve all the _Sent Dataview as it will time out without a doubt. Most Sent Dataviews contain a minimum of millions of records (6 months worth of sends) which is too much for any landing page or script activity to parse through.
So, judging from your question it looks like you are just looking for the size (length) of the _Sent object which can be obtainable, just through a different means.
- I would create a DE that contains all the _Sent Dataview fields
- Then create a SQL query to fill this DE with all the info from the Dataview
- Then you can use DataExtensionRowCount() in AMPScript to retrieve the rowcount of that DE.
Sample of Query:
Sample of AMPScript:
%%[ SET @SentCount = DataExtensionRowCount("mySentDataViewDE") ]%%
You can then put that query in an automation and schedule it to run at a timeframe you need it to and keep it as up to date as necessary.