Q:

how to change constants of class in Magento\Framwork?

I'm newbie.
My boss want to increase value of this const:
const MAX_NUM_COOKIES = 50;
path: vendor/magento/framework/Stdlib/Cookie/PhpCookieManager.php
is it possible? if yes, which's the best way to do that?

A:

First, your boss should be aware of the implications: incompatibility with several more or less outdated browsers, depending on much you increase it.
Especially IE 11 and lower have the 50 Cookie per domain limit and still a relevant market share.
See: http://browsercookielimits.squawky.net/
Also from that site:

If you want to support most browsers, then don't exceed 50 cookies per domain, and don't exceed 4093** bytes per domain (i.e. total size of all cookies <= 4093 bytes).

How to change a constant
Now, for the question: you cannot change constants themselves, you will have to find where they are used and find a way to change the usage. Most of the time, this will work with a plugin/interceptor (see: http://devdocs.magento.com/guides/v2.1/extension-dev-guide/plugins.html)
Your case
In your case, there's only one usage of the constant and it's in the PhpCookieManager class itself, in checkAbilityToSendCookie(). Unfortunately this is a private method which cannot be pluginized, so let's see where it is used:

deleteCookie()
setCookie()

setCookie() is protected, so again, you cannot write a plugin for it. It's used in all remaining public methods and I don't see a way to change the checkAbilityToSendCookie() call without replacing the methods altogether.
That means it is easier and more sensible to replace the whole class. You can do that with preferences (see: http://devdocs.magento.com/guides/v2.1/extension-dev-guide/build/di-xml-file.html)
<preference for="Magento\Framework\Stdlib\Cookie\CookieManagerInterface" type="YourNamespace\YourModule\PhpCookieManager" />

Your own PhpCookieManager then should be a full copy of the original one, but with the constant changed. Note that this only works because the constant is used in the class itself. Constants are referred by the exaxt class name and the DI system of Magento cannot change anything about it.

