Day counter between two dates
Do not use using namespace std in global scope.
Never use global variables.  Right away, this will introduce all sorts of problems, including maintainability and bugs.  There are different alternatives to this, one being a struct:

Such a structure just needs the month, day, and year:

struct Date
{
    int month;
    int day;
    int year;
};


Initialize the two Date instances:

// same order as appears in struct
Date date1 = {1, 2, 2000};
Date date2 = {4, 5, 2001};


Access the structures and set the data members (with your code):

std::cout &lt;&lt; "Enter first date: ";
std::cin &gt;&gt; date1.year &gt;&gt; date1.month &gt;&gt; date1.day;
std::cout &lt;&lt; "Enter second date: ";
std::cin &gt;&gt; date2.year &gt;&gt; date2.month &gt;&gt; date2.day;


If you want to get into encapsulation/information-hiding, I'd recommend a class instead.  If you want to keep this simpler than a struct, just move the globals into main() (but use the variables from my example).  You could also create more specialized functions, thereby not just working in main().  Modularity will help keep your code more organized and maintainable.
I don't like int for these values (dates cannot be negative).  I'd go with std::size_t instead (include &lt;cstddef&gt; to use it).
month_days[] should be a const while in global scope.  As a constant, it can remain there because it cannot be changed by anything else.  However, this will prevent you from accounting for leap-years.  Speaking of which...
To account for leap-years, I'd either:


leave out February's value from the array (it's the only value that could change)
not make the array a constant (the program will handle the values during runtime)


With that, you can allow the program to adjust February's value if a leap-year.