diff --git modules/file/file.module modules/file/file.module
index 2dd2bad..a54c48e 100644
--- modules/file/file.module
+++ modules/file/file.module
@@ -250,6 +250,10 @@ function file_ajax_upload() {
     return array('#type' => 'ajax', '#commands' => $commands);
   }
 
+  // Call element #process callbacks before getting file count from element.
+  $form_state['values'] = array();
+  $form = form_builder($form['#form_id'], $form, $form_state);
+
   // Get the current element and count the number of files.
   $current_element = $form;
   foreach ($form_parents as $parent) {
