Is there any simple way that makes all ... equations numbered without changing all the $$...$$?
In case you're free to use LuaLaTeX to compile your document, the following solution -- which is a variation on this answer -- should be of interest to you. It sets up a Lua function that acts as pre-processor, automatically replacing all instances of $$ with either \begin{equation} or \end{equation}, as appropriate, before LaTeX starts its usual processing. The Lua function also knows what to do if it comes across pairs of $$ symbols on a single line, e.g., $$a^2+b^2=c^2$$ or $$ e^{i\pi}-1=0 $$.
The answer shown below also sets up two utility macros: \ReplaceDoubleDollarsOn and \ReplaceDoubleDollarsOff. The former switches the Lua function on, and the latter switches it back off. Having the ability to switch off the Lua function should be useful, e.g., if your document contains URL strings that feature instances of $$, or if it contains verbatim material that contains instances of $$.

% !TEX TS-program = lualatex
\documentclass{article}
\usepackage{luacode} % for 'luacode' environment
\begin{luacode}
in_display_math = false -- initialize a Boolean variable
function replace_ddollar ( line )
line = line:gsub ( "%$%$(.-)%$%$" , -- pairs of "$$" on 1 line
"\\begin{equation} %1 \\end{equation}" )
line = line:gsub ( "%$%$" , function (x) -- found single instance of "$$"
if not in_display_math then
in_display_math = true
return "\\begin{equation}"
else
in_display_math = false
return "\\end{equation}"
end
end )
return line
end
\end{luacode}
%% Set up two LaTeX utility macros:
\newcommand\ReplaceDoubleDollarsOn{%
\directlua{ luatexbase.add_to_callback(
"process_input_buffer", replace_ddollar, "replace_ddollar" )}}
\newcommand\ReplaceDoubleDollarsOff{%
\directlua{ luatexbase.remove_from_callback(
"process_input_buffer", "replace_ddollar" )}}
\ReplaceDoubleDollarsOn % Switch Lua function _on_ by default
\usepackage{url} % just for this example
\begin{document}
$$
E = mc^2
$$
$$a^2+b^2=c^2$$ $$d^2+e^2=f^2$$ % Aside: I do not endorse this coding style!
$$
x = 3\alpha^2 + \beta = \int f\, d\mu.
$$
% Switch the Lua function off
\ReplaceDoubleDollarsOff
\url{A_URL_string_with_a_$$_and_$$$$_and_another_$$}
% Switch the Lua function back on
\ReplaceDoubleDollarsOn
$$ e^{i\pi}-1=0 $$
$$
1+1=2
$$
\end{document}
$$is not good. You don't know if it is opening or closing. Consider use\[ \]instead. – Sigur Jun 16 '18 at 14:26\[ … \]preferable to$$ … $$? – Mico Jun 16 '18 at 14:42$$into alternatively\begin{equation}and\end{equation}with a good editor. – egreg Jun 16 '18 at 17:46