function value = r8mat_nonzeros ( m, n, a )

%*****************************************************************************80
%
%% r8mat_nonzeros() counts the nonzeros in an R8MAT.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    31 August 2014
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    integer M, N, the number of rows and columns.
%
%    real A(M,N), the matrix.
%
%  Output:
%
%    integer VALUE, the number of nonzeros.
%
  value = length ( find ( a ) );

  return
end
