Total number of cells in R numeric dataframe Problem statement

The task is to write the shortest R statement to count the cells (rows * cols) in an instance of the R type numeric data.frame. For example, the data.frame which would be displayed as

  a    b  c
1 1 2000 NA
2 2 2000 NA
3 3 2000 1
4 4 2000 Inf


has 12 cells.

Input

The data.frame is supplied in variable x. You may assume that it contains only numbers, boolean, NA, Inf (no strings and factors).

Test cases

Example code to construct your own data.frame:

x &lt;- merge(data.frame(a = 1:100), 
    merge(data.frame(b = 2000:2012), 
    data.frame(c = c(NA, 10, Inf, 30))))


The expected output is 15600.

Appendix

Curious if someone can beat my solution :-) I don't want to take the fun from you so I will not reveal it now, I will only show you md5sum of my solution so that you later trust me in case you invent the same :-)

d4f70d015c52fdd942e46bd7ef2824b5
My best two attempts so far only got me down to 11 characters. I'd love to see fewer than @Spacedman's 10!

&gt;sum( `[&lt;-`(x,,,1) )
[1] 15600

&gt;sum(!(F&amp;x))
[1] 15600


Got it!

sum(x^0)
[1] 15600