code: public int getDataFrameSize(DataFrame dataFrame)
      {
          long l = dataFrame != null ? dataFrame.count() : 0;
          if (l < Integer.MIN_VALUE || l > Integer.MAX_VALUE)
          {
              logger.error(l + " cannot be cast to int without changing its value.");
              return 0;
          }
          return (int) l;
      }
docs: Gets the data frame size.
  
  @param dataFrame
  the data frame
  @return the data frame size